@Inject('$http')
class HomeStatsService {
  // 统计
  getStatsNum(orgId) {
    return this.$http({
      url: '/api/v1/homePage/statistics',
      method: 'GET',
      param: { orgId },
    });
  }

  // 安全活动统计
  getSafeActivityStatsNum(orgId) {
    return this.$http.post('/api/v1/homePage/safeActivity/statistics', orgId);
  }

  // 资料总量
  queryDocumentNum(param) {
    return this.$http.post('/api/v1/homePage/document/statistics', param);
  }

  // 巡查情况
  queryCheck(param) {
    return this.$http.post('/api/v1/homePage/patrolSituation', param);
  }

  // 本月巡查情况
  getMonthCheck(id) {
    return this.$http({
      url: '/api/v1/homePage/statistics/patrolSituation',
      method: 'GET',
      params: id,
    });
  }

  // 问题列表
  queryProblem(param) {
    return this.$http.post('/api/v1/patrol/query', param);
  }

  // 施工队列表
  queryConstruction(param) {
    return this.$http.post('/api/v1/homePage/constructionTeam/query', param);
  }

  // 施工队问题数量
  queryConsProblemNum(param) {
    return this.$http.post('/api/v1/homePage/constructionTeamProblem/statistics', param);
  }

  // 问题分类
  queryProblemClassify(param) {
    return this.$http.post('/api/v1/homePage/problemClassify/statistics', param);
  }

  // 人员进出场
  // queryWorkerInOut(param) {
  //   return this.$http.post('/api/v1/homePage/staffInOut/statistics', param);
  // }

  // 设备进出场
  // queryDeviceInOut(param) {
  //   return this.$http.post('/api/v1/homePage/deviceInOut/statistics', param);
  // }

  // 人员进出场（监理）
  queryJLStaffInOutStatistics(param) {
    return this.$http.post('/api/v1/homePage/selfStaffInOut/statistics', param);
  }

  // 人员进出场情况
  queryStaffInOutStatistics(param) {
    return this.$http.post('/api/v1/homePage/staffInOut/statistics', param);
  }

  // 设备进出场情况( 监理 )
  querySelfDeviceInOutStatistics(param) {
    return this.$http.post('/api/v1/homePage/selfDeviceInOut/statistics', param);
  }

  // 设备进出场情况
  queryDeviceInOutStatistics(param) {
    return this.$http.post('/api/v1/homePage/deviceInOut/statistics', param);
  }

  // 本月巡查统计
  getStatsPatrolSituation(param) {
    return this.$http({
      url: '/api/v1/homePage/statistics/patrolSituation',
      method: 'GET',
      params: param,
    });
  }

  // 查询标进展情况列表
  queryTenderProgres(param) {
    return this.$http.post('/api/v1/tenderProgres/query', param);
  }

  // 项目信息
  getProjectInfo(param) {
    return this.$http({
      url: '/api/v1/tenderProgres/getOrgNewInfo',
      method: 'GET',
      params: param,
    });
  }

  // 领导首页
  // 本月安全管理
  getSecurityManageSituation(param) {
    return this.$http({
      url: '/api/v1/homePage/statistics/securityManageSituation',
      method: 'GET',
      params: param,
    });
  }

  // 问题分布
  queryProblemDistribute(param) {
    return this.$http.post('/api/v1/homePage/problemDistribute/statistics', param);
  }

  // 获取单位巡查概况
  queryOrgPatrol(orgId) {
    return this.$http({
      url: '/api/v1/homePage/orgPatrolSituation/statistics',
      method: 'GET',
      params: { orgId },
    });
  }

  // 查询所有机构（领导首页）
  queryOrgList() {
    return this.$http.get('/api/v1/homePage/queryOrgList');
  }

}

export default HomeStatsService;
